package com.chenlei.toppopup.util;

import android.app.Activity;
import android.view.WindowManager;

/**
 * Created by chenlei on 2018/3/23.
 */

public class PopupWindowUtils
{
  public static void updatePopupWindowBgAlpha(Activity activity,float alpha){
    WindowManager.LayoutParams params = activity.getWindow().getAttributes();
    params.alpha = alpha;
    activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
    activity.getWindow().setAttributes(params);
  }
}
